package models;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

import play.db.ebean.Model;

@Entity
public class ApiKey extends Model {

    private static final long serialVersionUID = 1L;

    @Id
    private Long keyId;

    private String vCode;

    private Date endDate;

    @ManyToOne
    private User user;

    public static Finder<Long, ApiKey> find = new Finder<Long, ApiKey>(Long.class, ApiKey.class);

    public Long getKeyId() {
        return keyId;
    }

    public void setKeyId(Long keyId) {
        this.keyId = keyId;
    }

    public String getvCode() {
        return vCode;
    }

    public void setvCode(String vCode) {
        this.vCode = vCode;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

}
